package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.MesSendFactoryLogMapper;
import com.ruoyi.order.domain.MesSendFactoryLog;
import com.ruoyi.order.service.IMesSendFactoryLogService;

/**
 * 检测结果发送工厂日志Service业务层处理
 * 
 * @author guoxl
 * @date 2025-07-03
 */
@Service
public class MesSendFactoryLogServiceImpl implements IMesSendFactoryLogService 
{
    @Autowired
    private MesSendFactoryLogMapper mesSendFactoryLogMapper;

    /**
     * 查询检测结果发送工厂日志
     * 
     * @param id 检测结果发送工厂日志主键
     * @return 检测结果发送工厂日志
     */
    @Override
    public MesSendFactoryLog selectMesSendFactoryLogById(Long id)
    {
        return mesSendFactoryLogMapper.selectMesSendFactoryLogById(id);
    }

    @Override
    public MesSendFactoryLog selectMesSendFactoryLogForSend(String status) {
        return mesSendFactoryLogMapper.selectMesSendFactoryLogForSend(status);
    }

    /**
     * 查询检测结果发送工厂日志列表
     * 
     * @param mesSendFactoryLog 检测结果发送工厂日志
     * @return 检测结果发送工厂日志
     */
    @Override
    public List<MesSendFactoryLog> selectMesSendFactoryLogList(MesSendFactoryLog mesSendFactoryLog)
    {
        return mesSendFactoryLogMapper.selectMesSendFactoryLogList(mesSendFactoryLog);
    }

    /**
     * 新增检测结果发送工厂日志
     * 
     * @param mesSendFactoryLog 检测结果发送工厂日志
     * @return 结果
     */
    @Override
    public int insertMesSendFactoryLog(MesSendFactoryLog mesSendFactoryLog)
    {
        mesSendFactoryLog.setCreateTime(DateUtils.getNowDate());
        return mesSendFactoryLogMapper.insertMesSendFactoryLog(mesSendFactoryLog);
    }

    /**
     * 修改检测结果发送工厂日志
     * 
     * @param mesSendFactoryLog 检测结果发送工厂日志
     * @return 结果
     */
    @Override
    public int updateMesSendFactoryLog(MesSendFactoryLog mesSendFactoryLog)
    {
        mesSendFactoryLog.setUpdateTime(DateUtils.getNowDate());
        return mesSendFactoryLogMapper.updateMesSendFactoryLog(mesSendFactoryLog);
    }

    /**
     * 批量删除检测结果发送工厂日志
     * 
     * @param ids 需要删除的检测结果发送工厂日志主键
     * @return 结果
     */
    @Override
    public int deleteMesSendFactoryLogByIds(Long[] ids)
    {
        return mesSendFactoryLogMapper.deleteMesSendFactoryLogByIds(ids);
    }

    /**
     * 删除检测结果发送工厂日志信息
     * 
     * @param id 检测结果发送工厂日志主键
     * @return 结果
     */
    @Override
    public int deleteMesSendFactoryLogById(Long id)
    {
        return mesSendFactoryLogMapper.deleteMesSendFactoryLogById(id);
    }
}
